
package com.zsrt.day20170417.ch03;

public class Animal {
	
	/**
	 * 名字
	 */
	private String name;
	
	/**
	 * 年龄
	 */
	private int age;

	private String color;
	
	
	
	/**
	 * @return the color
	 */
	public String getColor() {
		return color;
	}

	/**
	 * @param color the color to set
	 */
	public void setColor(String color) {
		this.color = color;
	}

	/**
	 * @return the age
	 */
	public int getAge() {
		return age;
	}

	/**
	 * @param age the age to set
	 */
	public void setAge(int age) {
		this.age = age;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 父类的构造方法子类不能继承
	 * @param name
	 */
	public Animal(String name) {
		super();
		this.name = name;
	}

	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Animal [name=" + name + ", age=" + age + ", color=" + color + "]";
	}

	/**
	 * @param name
	 * @param age
	 */
	public Animal(String name, int age) {
		super();
		this.name = name;
		this.age = age;
	}

	/**
	 * @param name
	 * @param age
	 * @param color
	 */
	public Animal(String name, int age, String color) {
		super();
		this.name = name;
		this.age = age;
		this.color = color;
	}

	/**
	 * @param age
	 * @param color
	 */
	public Animal(int age, String color) {
		super();
		this.age = age;
		this.color = color;
	}
	
	

}
